<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/hpp_c1_c2.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<%@ include file="/common/meta.jsp" %>
<title>VTC - Holistic Programme Planning - HPP</title>
<%@ include file="/common/css_js.jsp"%>

<script type="text/javascript">

	function clickBtn(action,e,id){
		var code="<s:property value='code'/>";
		var programmeId="<s:property value='programmeId'/>";
		
		switch(action){
		case "addHkcaavq":
			popup(e, "programme-accreditation!hkcaavqInput.action?no-decorate&programmeId="+programmeId+"&code="+code, 'width:600;height:300');
			return;
			
		case "addInternal":
			popup(e, "programme-accreditation!internalInput.action?no-decorate&programmeId="+programmeId+"&code="+code, 'width:600;height:320');
			return;
			
		case "editHkcaavq":
			popup(e, "programme-accreditation!hkcaavqInput.action?no-decorate&programmeId="+programmeId+"&code="+code+"&hkcaavqValidation.id="+id, 'width:600;height:300');
			return;
			
		case "editInternal":
			popup(e, "programme-accreditation!internalInput.action?no-decorate&programmeId="+programmeId+"&code="+code+"&internalValidation.id="+id, 'width:600;height:320');
			return;
			
		case "deleteHkcaavq":
			window.location="programme-accreditation!deleteHkcaavq.action?programmeId="+programmeId+"&code="+code+"&hkcaavqValidation.id="+id;
			return;
			
		case "deleteInternal":
			window.location="programme-accreditation!deleteInternal.action?programmeId="+programmeId+"&code="+code+"&internalValidation.id="+id;
			return;
		}
	}
	
</script> 

</head>
<body>	

   <div class="pageTitle">Programme Maintenance - Edit </div>
   <div class="wTab">
     <table height="100%" cellspacing="0" cellpadding="0" border="0" id="programmeTabs">
       <tbody><tr>
         <td id="itemA" class="item1">
         	<a href="programme-info.action?programmeId=<s:property value='programmeId'/>">Programme Information</a>
         </td>
         <td id="itemB" class="item2">
         	<a href="programme-accreditation.action?programmeId=<s:property value='programmeId'/>">Programme Accreditation</a>
         </td>
         <td id="itemC" class="item1">
         	<a href="programme-subject-group.action?programmeId=<s:property value='programmeId'/>">Subject Group</a>
         </td>
       </tr>
      </tbody>
     </table>
   </div>


		<div class="form2">
		  <span class="errorLabel" id="errorMsgSpan"></span>
		  <s:actionerror/>
		  <s:fielderror/>
		  <s:actionmessage/> 
		  
		  <s:form id="mainForm" name="mainForm" namespace="/programme" 
		  		  action="programme-accreditation.action" validate="true">
			<s:hidden name="programmeId"></s:hidden>		
		
		
           <div class="pageTitle2">Section 1</div>
           <table cellspacing="0" cellpadding="0" border="0">
             <tbody><tr>
               <td class="sep"><img style="width:180px;" src="../images/spacer.gif"></td>
               <td class="sep"><img style="width:180px;" src="../images/spacer.gif"></td>
               <td class="sep sep2"><img src="../images/spacer.gif"></td>
             </tr>
             <tr>
               <td colspan="3"><label class="fLabel">Programme Code</label>
                 <div class="fField">
                 	<s:textfield id="code" name="programme.code" cssStyle="width:150px" readonly="true"/>
                 </div>
               </td>
             </tr>
             <tr>
               <td><label class="fLabel">Duration</label>
                 <div class="fField">
                 	<s:textfield name="programme.duration" cssStyle="width:150px" readonly="true"/>
                 </div></td>
               <td><label class="fLabel">Duration Type </label>
                 <div class="fField">
                   <s:textfield name="programme.durationType" cssStyle="width:150px" readonly="true"/>
                 </div>
                </td>
                <td>&nbsp;</td>
             </tr>
           </tbody></table>
           <br>
           <div class="pageTitle2">Section 2</div>
           <table cellspacing="0" cellpadding="0" border="0">
             <tbody><tr>
               <td class="sep"><img style="width:180px;" src="../images/spacer.gif"></td>
               <td class="sep"><img style="width:180px;" src="../images/spacer.gif"></td>
               <td class="sep"><img style="width:180px;" src="../images/spacer.gif"></td>
               <td class="sep sep2"><img src="../images/spacer.gif"></td>
             </tr>
             <tr>
               <td colspan="2"><label class="fLabel">Programme Title (Short) </label>
                 <div class="fField">
                   <s:textfield name="programme.titleShort" cssStyle="width:330px" readonly="true"/>	
                 </div></td>
               <td colspan="2"><label class="fLabel">Programme Title (Long)</label>
                 <div class="fField">
                   <s:textfield name="programme.titleLong" cssStyle="width:330px" readonly="true"/>
                 </div></td>
               <td></td>
             </tr>
             <tr>
               <td colspan="2"><label class="fLabel">Programme Title in 
                   Chinese (Short)</label>
                 <div class="fField">
                   <s:textfield name="programme.titleZhShort" cssStyle="width:330px" readonly="true"/>
                 </div></td>
               <td colspan="2"><label class="fLabel">Programme Title in 
                   Chinese (Long)</label>
                 <div class="fField">
                   <s:textfield name="programme.titleZhLong" cssStyle="width:330px" readonly="true"/>
                 </div></td>
               <td></td>
             </tr>
           </tbody></table>
           <br>
           <div class="pageTitle2">HKCAAVQ Validation</div>
           <div class="sListBorder"> 
           
                	<div class="sList">
                        <table width="100%" cellspacing="0" cellpadding="0" border="0" class="sTable">
                          <tbody>
                          <tr>
                            <td class="sTh">Area of Study/Training </td>
                            <td class="sTh">Programme Area</td>
                            <td class="sTh">Validation Period</td>
                            <td style="width:200px;" class="sTh">Action</td>
                		  </tr>
                 
				      <s:iterator value="hkcaavqValidations" var="hkcaavqValidation" status="st">
				       
				      	  <s:set var="trClass" value="'sRow1'"></s:set>
				    	  <s:if test="#st.index%2==0">
				       	 	 <s:set var="trClass" value="'sRow2'"></s:set>
						  </s:if>
					      <s:else>
				       	     <s:set var="trClass" value="'sRow1'"></s:set>
				       	  </s:else>
						  
					      <tr class="<s:property value='#trClass'/>">
				                       
		                   <td class="sCell"><s:property value="#hkcaavqValidation.areaOfStudy"/></td>
		                   <td class="sCell"><s:property value="#hkcaavqValidation.programmeArea"/></td>
		                   <td class="sCell"><s:property value="#hkcaavqValidation.validationPeriodFrom"/> - <s:property value="#hkcaavqValidation.validationPeriodTo"/></td>
		                   <td class="sCell buttonCell">
			                  	 <div class="btnSet btnSetTypeA">
					                 <div class="button sbtn">
				                       <div class="left">
				                         <div class="right">
				                           <input type="button" onclick="clickBtn('editHkcaavq',event,'<s:property value='#hkcaavqValidation.id'/>')" value="Edit" name="" id="" class="inputButton">
				                         </div>
				                       </div>
				                     </div>  
				                       
					                 <div class="button sbtn">
					                   <div class="left">
					                     <div class="right">
					                       <input type="button" onclick="clickBtn('deleteHkcaavq',event,'<s:property value='#hkcaavqValidation.id'/>')" value="Delete" name="" id="" class="inputButton">
					                     </div>
					                   </div>
					                 </div>	
			                     </div>
		                    </td>
		                 </tr>
		                 
		                </s:iterator>
		                
               		  </tbody>
               		</table>
             </div>
             <div class="btnSet btnSetTypeA">
               <div class="left">
                 <div class="button">
                   <div class="left">
                     <div class="right">
                       <input type="button" onclick="clickBtn('addHkcaavq',event)" value="Add" name="" id="" class="inputButton">
                     </div>
                   </div>
                 </div>
               </div>
             </div>
           </div>
           <br>
           
           <div class="pageTitle2">Internal Validation</div>
           <div class="sListBorder"> 
                  <div class="sList">
                      <table width="100%" cellspacing="0" cellpadding="0" border="0" class="sTable">
                         <tbody>
                         	<tr>
                            	<td style="width:230px" class="sTh">Validity Period of Expire Date </td>
                  				<td class="sTh">Remarks</td>
                      			<td style="width:200px;" class="sTh">Action</td>
                 			</tr>
                 			
                 			
				     	 <s:iterator value="internalValidations" var="internalValidation" status="st">
				       
					      	  <s:set var="trClass" value="'sRow1'"></s:set>
					    	  <s:if test="#st.index%2==0">
					       	 	 <s:set var="trClass" value="'sRow2'"></s:set>
							  </s:if>
						      <s:else>
					       	     <s:set var="trClass" value="'sRow1'"></s:set>
					       	  </s:else>
							  
						      <tr class="<s:property value='#trClass'/>">                 			
			                 	
			                    <td class="sCell"><s:property value='#internalValidation.validityPeriodOfExpire'/></td>
			                    <td class="sCell"><s:property value='#internalValidation.remarks'/></td>
			                    <td class="sCell buttonCell">
			                    
			                    <div class="btnSet btnSetTypeA">
			                    
			                     <div class="button sbtn">
			                       <div class="left">
			                         <div class="right">
			                           <input type="button" onclick="clickBtn('editInternal',event,'<s:property value='#internalValidation.id'/>')" value="Edit" name="" id="" class="inputButton">
			                         </div>
			                       </div>
			                     </div>  
			                       
				                 <div class="button sbtn">
				                   <div class="left">
				                     <div class="right">
				                       <input type="button" onclick="clickBtn('deleteInternal',event,'<s:property value='#internalValidation.id'/>')" value="Delete" name="" id="" class="inputButton">
				                     </div>
				                   </div>
				                 </div>		
				                 	                       
			                     </div>
			                    </td>
			                 </tr>
		                 
		                 </s:iterator>
               		   </tbody>
               		  </table>
             	</div>
             	
	             <div class="btnSet btnSetTypeA">
	               <div class="left">
	                 <div class="button">
	                   <div class="left">
	                     <div class="right">
	                       <input type="button" onclick="clickBtn('addInternal',event)" value="Add" name="" id="" class="inputButton">
	                     </div>
	                   </div>
	                 </div>
	               </div>
	             </div>
	             
           </div>
           </s:form>
         </div>	
         
</body>
</html>   